#ifndef PPU_SYSTEM_H
#define PPU_SYSTEM_H

#include <vector>
#include <SDL/SDL.h>


#ifndef PATTERN_TYPES
#define PATTERN_TYPES
    #define BACKGROUND  0
    #define SPRITES     1
#endif

//obluga nesowej grafiki

class PPUSystem {
    public:
        void Init();
        
        void SetColorInPalette(int index, int color);
        void SetPalette(const int* colors);
        
        void SetPattern(int pattern_type, int index, char* pattern);
        
        void DrawPattern(int pattern_type, unsigned char pattern, int attributes, const char* DrawObjectName, int x, int y);
        
        void Uncompress(int pattern_type, int src, int dest, int lenght);
        
    private:
        
        std::vector<std::vector<char> > TableBackground;
        std::vector<std::vector<char> > TableSprites;
        
        std::vector<char> Palette;
};
        


#endif //PPU_SYSTEM_H
